package com.vision.sales.cl.data;

import java.util.Date;

import com.google.gwt.core.client.GWT;
import com.google.gwt.editor.client.Editor.Path;
import com.sencha.gxt.core.client.ValueProvider;
import com.sencha.gxt.data.shared.LabelProvider;
import com.sencha.gxt.data.shared.ModelKeyProvider;
import com.sencha.gxt.data.shared.PropertyAccess;
import com.vision.sales.cm.db.data.CollectionItem;
import com.vision.sales.cm.db.data.SalesInvoice;

/**
 * 
 * @author Mark
 *
 */
public interface CollectionItemProperties extends PropertyAccess<CollectionItem> {
	
	public static final CollectionItemProperties INSTANCE = GWT.create(CollectionItemProperties.class);
	
	@Path("salesInvoice.id")
	ModelKeyProvider<CollectionItem> key();
	
	@Path("salesInvoice.customer.name")
	LabelProvider<CollectionItem> nameLabel();
	
	@Path("collection.refNo")
	ValueProvider<CollectionItem, String> collectionRefNo();
	
	@Path("collection.date")
	ValueProvider<CollectionItem, Date> collectionDate();
	
	ValueProvider<CollectionItem, SalesInvoice> salesInvoice();
	
	@Path("salesInvoice.invoiceNo")
	ValueProvider<CollectionItem, String> salesInvoiceNo();
	
	@Path("salesInvoice.groupAndNo")
	ValueProvider<CollectionItem, String> salesInvoiceGroupAndNo();
	
	@Path("salesInvoice.date")
	ValueProvider<CollectionItem, Date> salesInvoiceDate();

	@Path("salesInvoice.grossSales")
	ValueProvider<CollectionItem, Double> grossSales();
	
	@Path("salesInvoice.balance")
	ValueProvider<CollectionItem, Double> balance();
	
	ValueProvider<CollectionItem, Double> amount();
	
	ValueProvider<CollectionItem, Double> overruns();
	ValueProvider<CollectionItem, Double> overpayments();
	
	ValueProvider<CollectionItem, Double> discounts();
	ValueProvider<CollectionItem, Double> rejects();
	ValueProvider<CollectionItem, Double> returns();
	
	ValueProvider<CollectionItem, Double> subtotal();
	ValueProvider<CollectionItem, Double> tax();
	
	ValueProvider<CollectionItem, Double> netAmount();
	
}